package com.nciae.utils;

import com.nciae.vo.ResultVo;

public class ResultVoUtils {

    public static ResultVo success(Object obj) {
        ResultVo resultVo = new ResultVo();
        resultVo.setData(obj);
        resultVo.setCode(0);
        resultVo.setMesssage("成功");
        return  resultVo;
    }

    public static ResultVo success() {
        return success(null);
    }

    public static ResultVo error(Integer code, String msg, Object obj) {
        ResultVo resultVo = new ResultVo();
        resultVo.setData(obj);
        resultVo.setCode(code);
        resultVo.setMesssage(msg);
        return  resultVo;
    }



}